//hide bottom
var div = document.getElementById('block-block-3');
div.style.display = 'none';
var div = document.getElementById('block-block-4');
div.style.display = 'none';
var div = document.getElementById('block-block-5');
div.style.display = 'none';

//hide status bar
var block_bottom = document.getElementsByClassName('block-bottom')[0];
block_bottom.style.display = 'none';

//hide side bar
var status = document.getElementById('game-status-right');
status.style.display = 'none';
var regex = /\d+/;

function check_fin() {
  var score_str = status.innerHTML.match(regex)[0];
  var score = parseInt(score_str);
  if(score >= 1000) {
    var span = document.getElementById('best-level');
    alert('Fin! Best level is ' + span.innerHTML);
  } else {
    console.log('still working, current score: ' + score);
    setTimeout(check_fin, 1000);
  }
}

check_fin();
